docs: Document CMAKE_BUILD_TYPE=Release for production builds#11249
Draft
sensei-hacker wants to merge 1 commit intoiNavFlight:maintenance-9.xfrom
Draft
docs: Document CMAKE_BUILD_TYPE=Release for production builds#11249sensei-hacker wants to merge 1 commit intoiNavFlight:maintenance-9.xfrom
sensei-hacker wants to merge 1 commit intoiNavFlight:maintenance-9.xfrom
Conversation
Add documentation about using CMAKE_BUILD_TYPE=Release to save disk space
when building firmware for production/CI/releases.
Key points:
- Default RelWithDebInfo mode uses ~109 GB for all targets
- Release mode uses ~4-6 GB (96% reduction)
- Debug symbols are stripped from final .hex files anyway
- Final binaries are identical in both modes
Updated files:
- docs/development/Building in Linux.md
- Add brief note about debug symbols in single target section
- Add new "Building All Targets or Release Builds" section with
disk usage comparison and Release mode instructions
- docs/development/release-create.md
- Add "Building Firmware Locally" section with Release mode
instructions and disk usage information
Also fixes typo: "Bulding" -> "Building"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds documentation about using
CMAKE_BUILD_TYPE=Releaseto save disk space when building firmware for production, CI, or release purposes.Problem
By default, INAV builds with
CMAKE_BUILD_TYPE=RelWithDebInfowhich includes maximum debug symbols (-ggdb3). When building all ~100 targets, this consumes ~109 GB of disk space. The debug symbols are automatically stripped from the final.hexfiles, so they provide no benefit for production builds.Solution
Document the use of
CMAKE_BUILD_TYPE=Releasefor production builds, which reduces disk usage to ~4-6 GB (96% reduction) while producing identical final binaries.Changes
docs/development/Building in Linux.md
docs/development/release-create.md
Key Points Documented
cmake -DCMAKE_BUILD_TYPE=Release ...hexand.binfiles are identical in both modesAlso Includes
Testing
Documentation changes only. No code modifications.